Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ib-tb: support magic keyboard backlight #4

Open
wants to merge 1 commit into
base: mbp15
Choose a base branch
from

Conversation

Redecorating
Copy link
Member

@Redecorating Redecorating commented Oct 16, 2021

MacBookPro16,1/2/3/4 and MacBookAir9,1 have the magic keyboard, with the
keyboard backlight controlled via the Touch Bar Backlight USB device.

We check that the internal keyboard's USB product ID matches that of
models with the magic keyboard, and then we create a sysfs led class
dev.

When setting the brightness to 15 (one less than the max of 16), it
seems to have about a 50% chance of setting it to dim instead. This
doesn't happen for other values.

@Redecorating Redecorating marked this pull request as draft October 16, 2021 11:15
@Redecorating
Copy link
Member Author

Setting as draft while I figure out how to get it to change the brightness like windows does.

@Redecorating Redecorating marked this pull request as ready for review October 17, 2021 05:02
@Redecorating
Copy link
Member Author

It's been tested on MBP16,1 and MBP16,2

@Redecorating Redecorating marked this pull request as draft October 18, 2021 00:16
@Redecorating
Copy link
Member Author

drafting again as it seems to print backtraces on mbp15,1 (although the touchbar was still working). Also, its now been tested on mbp16,3

@Redecorating Redecorating marked this pull request as ready for review October 18, 2021 22:20
apple-ib-tb.c Outdated Show resolved Hide resolved
@aunali1
Copy link
Member

aunali1 commented Jan 4, 2022

@Redecorating Is this ready to merge?

@Redecorating
Copy link
Member Author

The backlight doesn't get freed when the module is unloaded, I'll try to fix that tomorrow.

MacBookPro16,1/2/3/4 have the magic keyboard, with the keyboard
backlight controlled via the Touch Bar Backlight USB device.

We check that the internal keyboard's USB product ID matches that of
models with the magic keyboard, and then we create a sysfs led class
dev that controls the backlight.
@Redecorating
Copy link
Member Author

@aunali1 it's ready now

@bcmedeiros
Copy link

is this going to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants